home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / stevie.arc / PORTING.DOC < prev    next >
Text File  |  1990-01-10  |  2KB  |  70 lines

  1.  
  2.          Release Notes for STEVIE - Version 3.10
  3.  
  4.            Atari ST Editor for VI Enthusiasts
  5.  
  6.                     Porting
  7.  
  8.  
  9.                   Tony Andrews
  10.  
  11.                   3/6/88
  12.  
  13.  
  14.     Porting the editor is a relatively simple task. Most of the
  15. code is pretty machine-independent. For each environment, there is
  16. a file of routines that perform various low-level operations that
  17. tend to vary a lot from one machine to another. Another file contains
  18. the escape sequences to be used for each machine.
  19.  
  20.     The machine-dependent files currently used are:
  21.  
  22. tos.c:    Atari ST - ifdef for either Megamax or Alcyon
  23.  
  24. unix.c:    UNIX System V
  25.  
  26. os2.c:    Microsoft OS/2
  27.  
  28.  
  29.     Each of these files are around 150 lines long and deal with
  30. low-level issues like character I/O to the terminal, terminal
  31. initialization, cursor addressing, and so on. There are different
  32. tradeoffs to be made depending on the environment. For example, the
  33. UNIX version buffers terminal output because of the relatively high
  34. overhead of system calls. A quick look at the files will make it clear
  35. what needs to be done in a new environment.
  36.  
  37.     Terminal escape sequences are in the file "term.h". These are
  38. defined statically, for the time being. There is some discussion in
  39. term.h regarding which sequences are optional and which are not. The
  40. editor is somewhat flexible in dealing with a lack of terminal
  41. capabilities.
  42.  
  43.     Because not all C compilers support command line macro definitions,
  44. the #define's for system-specific macros are placed at the beginning of the
  45. file 'stevie.h'. If you port to a new system, add another line there to
  46. define the macro you choose for your port.
  47.  
  48.     The basic process for doing a new port is:
  49.  
  50.     1. Come up with a macro name to use when ifdef'ing your system-
  51.        specific changes. Add a line at the top of 'stevie.h' to define
  52.        the macro name you've chosen.
  53.  
  54.     2. Look at unix.c, tos.c, and os2.c and copy the one that comes
  55.        closest to working on your system. Then modify your new file
  56.        as needed.
  57.  
  58.     3. Look at term.h and edit the file appropriately adding a new
  59.        set of escape sequence definitions for your system.
  60.  
  61.     4. If you haven't already, get a copy of Henry Spencer's regular
  62.        expression library and compile it. This has been very simple
  63.        every time I've done it.
  64.  
  65.     5. Compiling and debug the editor.
  66.  
  67.  
  68.     In most cases it should really be that simple. I've done two
  69. ports (UNIX and OS/2) and both were complete in just a couple of hours.
  70.